package WaitNotify.demo3;


public class Main {
    public static void main(String[] args) throws InterruptedException {

        //三个居民开始收信
        for(int i =0;i<3;++i) {
            new People().start();
        }

        Thread.sleep(1000);
        //1s后邮递员们开始送信

        for(Integer id : MailBox.getAllId()) {
            new Postman(id,"送信" +id ).start();
        }

    }
}